IntentSanitizer
This class is used to make a sanitized copy of an Intent. This could be used when UnsafeIntentLaunchViolation is detected. This class is thread safe and the object created is safe to be reused. Typical usage of the class:
Intent intent = new IntentSanitizer.Builder()
.allowComponent(“com.example.ActivityA”)
.allowData(“com.example”)
.allowType(“text/plain”)
.build()
.sanitizeByThrowing(intent);
Content copied to clipboard